/**
 * @class Ext.app.ResultPanel
 * @extends Ext.panel.Panel
 */
Ext.define('Ext.app.ResultPanel', {
    extend: 'Ext.tab.Panel',
    alias: 'widget.resultPanel',
    autoScroll: true,
    border: false,
    id: 'resultPanel',
    
    activeTab: 0,
    items: [
        {
            title: this.translations.get("HOME.RESULT_TAB"),
            name: 'resultTab',
            layout: 'border',
            bodyPadding: 10,
            items: []
        },
        {
            title: this.translations.get("HOME.LOG_TAB"),
            name: 'logTab',
            layout: 'border',
            bodyPadding: 10,
            items: []
        },
        {
            title: this.translations.get("HOME.OUTPUT_TAB"),
            name: 'outputTab',
            layout: 'border',
            bodyPadding: 10,
            items: [
                {
                    region: 'north',
                    xtype: 'toolbar',
                    items : {
                        xtype: 'button',
                        text: this.translations.get("HOME.OUTPUT_TAB_CLEAR"),
                        handler: function(button) {
                            var textarea = button.up('[name=outputTab]').down('[name=output]');
                            textarea.setValue("");
                        }
                    }
                },
                {
                    region: 'center',
                    xtype: 'textarea',
                    readOnly: true,
                    autoScroll: true,
                    name: 'output'
                }
            ]
        }
    ],
    
    constructor: function (translations, functions) {
        this.translations = translations;
        this.functions = functions;
        
        this.callParent(arguments);
    },
    
    setOutput: function(value) {
        var textarea = this.down('[name=output]');
        textarea.setValue(value);
    },
    
    initResultTab: function(jsObj) {
        
    }
});
